package org.jeecg.modules.ws.common;

import lombok.Getter;
import org.jeecg.modules.ws.entity.WsBondInfo;
import org.jeecg.modules.ws.service.*;

/**
 * 附件枚举
 * @author ZJJ
 * @date 2025-04-21 下午5:13
 * @copyright Copyright (c) 2025 ZJJ
 */
@Getter
public enum WsFileEnum {
    // 债券信息管理
    BOND("wsBondInfo", "", IWsBondInfoService.class),
    // 项目基本信息
    PROJECT("wsProject", "", IWsProjectService.class),
    // 资产管理-内部图片
    ASSET_MANAGEMENT_INTERIOR_PICTURES("wsAssetManagement", "interiorPictures", IWsAssetManagementService.class),
    // 资产管理-外部图片
    ASSET_MANAGEMENT_EXTERNAL_PICTURES("wsAssetManagement", "externalPicture", IWsAssetManagementService.class),
    // 资产管理-卫星定位图片
    ASSET_MANAGEMENT_LOCATION_PICTURES("wsAssetManagement", "locationPicture", IWsAssetManagementService.class),
    // 招标项目-招标代理采购审批表
    TENDER_PROJECT_AGENT_PURCHASE_APPROVAL_FORM("wsTenderProject", "agentPurchaseApprovalForm", IWsTenderProjectService.class),
    // 招标项目-招标代理合同审批表
    TENDER_PROJECT_AGENCY_CONTRACT_APPROVAL_FORM("wsTenderProject", "agencyContractApprovalForm", IWsTenderProjectService.class),
    // 招标项目-招标文件1
    TENDER_PROJECT_BIDDING_DOCUMENT1("wsTenderProject", "biddingDocument1", IWsTenderProjectService.class),
    // 招标项目-招标文件2
    TENDER_PROJECT_BIDDING_DOCUMENT2("wsTenderProject", "biddingDocument2", IWsTenderProjectService.class),
    // 招标项目-招标文件审批表
    TENDER_PROJECT_BIDDING_DOCUMENT_APPROVAL_FORM("wsTenderProject", "biddingDocumentApprovalForm", IWsTenderProjectService.class),
    // 招标项目-中标结果审批表
    TENDER_PROJECT_WINNING_RESULT_APPROVAL_FORM("wsTenderProject", "winningResultApprovalForm", IWsTenderProjectService.class),
    // 招标项目-招标代理合同
    TENDER_PROJECT_AGENCY_CONTRACT("wsTenderProject", "agencyContract", IWsTenderProjectService.class),
    // 比价项目-询价函
    PARITY_ITEM_LETTER_INQUIRY("wsParityItem", "letterInquiry", IWsParityItemService.class),
    // 比价项目-询价函审批表
    PARITY_ITEM_INQUIRY_FORM("wsParityItem", "inquiryForm", IWsParityItemService.class),
    // 比价项目-供应商报价单
    PARITY_ITEM_SUPPLIER_QUOTATION_DOCUMENT("wsParityItem", "supplierQuotationDocument", IWsParityItemService.class),
    // 比价项目-采购审批流程
    PARITY_ITEM_PROCUREMENT_APPROVAL_PROCESS("wsParityItem", "procurementApprovalProcess", IWsParityItemService.class),
    // 督办事项-附件
    WS_EVENT_ATTACHMENTS("wsEvent", "attachments", IWsEventService.class),
    // 资金支付详情-附件
    WS_CAPITAL_DETAIL_FILE_PATH("wsCapitalDetail", "filePath", IWsCapitalDetailService.class),
    // 月度报告(bizTableId->shxydm+year+month)
    WS_YDBG("wsYdbg", "", IWsYdbgService.class),
    // 资产负债表
    WS_CWBB_ZCFZB("wsZcfzb", "", IWsZcfzbService.class),
    // 利润表
    WS_CWBB_LRB("wsLrb", "", IWsLrbService.class),
    // 现金流量表
    WS_CWBB_XJLLB("wsXjllb", "", IWsXjllbService.class),
    ;

    private String bizName;

    private String bizFieldName;

    private Class<?> bizClass;

    WsFileEnum(String bizName, String bizFieldName, Class<?> bizClass) {
        this.bizName = bizName;
        this.bizFieldName = bizFieldName;
        this.bizClass = bizClass;
    }
    public static WsFileEnum getByBizName(String bizName) {
        for (WsFileEnum wsFileEnum : WsFileEnum.values()) {
            if (wsFileEnum.getBizName().equals(bizName)) {
                return wsFileEnum;
            }
        }
        return null;
    }
}
